/*
Unit Card simple example
*/

function setupCardData() {
	card.name = "Simple Example Unit";
	card.desc = "A simpler take on an example unit.";
	card.refId = "se.kayarr.examples.secondunit";
	card.maxHealth = 100;
	
	card.addAbility("Health Cutter", "Cuts the health of its target in half.", Targetable.ANY_ANY,
		function(ability, unit, user, target) {
			var oldHealth = unit.health.current;
			unit.health.percent /= 2;
			unit.session.narrate(target.name + "'s health is instantly cut in half, dealing " + (oldHealth - target.health.current) + " damage!");
			return true;
		}
	);
}

function onInit(unit) {
}

function onPlaced(unit) {
}